import {WithHttpMethod, WithFormUrlEncodedBody, WithBearerToken, CodeError} from "foundation";
import { Send } from "MVx";
import {MainApp} from "../MainApp";

class Body {
}

class Response {
  public message:string|null=null;
  public code:string|null=null;
  public status:boolean|null=null;
  public body:Body = new Body();
}

export async function GetUserInfo(customerId:string):Promise<CodeError|null>{
  const [ret, err] = await Send<Response>('/customer/custom/info', {customerId:customerId},
    Response, MainApp.plugin().getMainNet(),
    WithHttpMethod("GET"), WithFormUrlEncodedBody(), WithBearerToken());
  //todo ret 入模型
  console.log("ret", ret);

  return err;
}
